<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>gdsl: gdsl_interval_heap.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">gdsl
   &#160;<span id="projectnumber">1.7</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('gdsl__interval__heap_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">gdsl_interval_heap.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="gdsl__interval__heap_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * This file is part of the Generic Data Structures Library (GDSL).</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2013 Nicolas Darnis &lt;ndarnis@free.fr&gt;.</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * The GDSL library is free software; you can redistribute it and/or </span>
<a name="l00006"></a>00006 <span class="comment"> * modify it under the terms of the GNU General Public License as </span>
<a name="l00007"></a>00007 <span class="comment"> * published by the Free Software Foundation; either version 2 of</span>
<a name="l00008"></a>00008 <span class="comment"> * the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * The GDSL library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00016"></a>00016 <span class="comment"> * along with the GDSL library; see the file COPYING.</span>
<a name="l00017"></a>00017 <span class="comment"> * If not, write to the Free Software Foundation, Inc., </span>
<a name="l00018"></a>00018 <span class="comment"> * 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.</span>
<a name="l00019"></a>00019 <span class="comment"> *</span>
<a name="l00020"></a>00020 <span class="comment"> * $RCSfile: gdsl__interval__heap_8h_source.html,v $</span>
<a name="l00021"></a>00021 <span class="comment"> * $Revision: 1.3 $</span>
<a name="l00022"></a>00022 <span class="comment"> * $Date: 2013/06/12 16:36:13 $</span>
<a name="l00023"></a>00023 <span class="comment"> */</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#ifndef _GDSL_INTERVAL_HEAP_H_</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define _GDSL_INTERVAL_HEAP_H_</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="preprocessor">#include &quot;<a class="code" href="gdsl__types_8h.html">gdsl_types.h</a>&quot;</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> 
<a name="l00037"></a>00037 {
<a name="l00038"></a>00038 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 
<a name="l00053"></a><a class="code" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241">00053</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>heap* <a class="code" href="group__gdsl__interval__heap.html#ga5e1a5587bdc007c4fbc5f70637456241" title="GDSL interval heap type.">gdsl_interval_heap_t</a>;
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 <span class="comment">/******************************************************************************/</span>
<a name="l00056"></a>00056 <span class="comment">/* Management functions of heaps                                              */</span>
<a name="l00057"></a>00057 <span class="comment">/******************************************************************************/</span>
<a name="l00058"></a>00058 
<a name="l00081"></a>00081 <span class="keyword">extern</span> gdsl_interval_heap_t
<a name="l00082"></a>00082 <a class="code" href="group__gdsl__interval__heap.html#gad82810541aa6da1501620005170f8f69" title="Create a new interval heap.">gdsl_interval_heap_alloc</a> (<span class="keyword">const</span> <span class="keywordtype">char</span>* NAME,
<a name="l00083"></a>00083               <a class="code" href="group__gdsl__types.html#ga32a9b4e8b9665183c2741d28a5ced64f" title="GDSL Alloc element function type.">gdsl_alloc_func_t</a> ALLOC_F,
<a name="l00084"></a>00084               <a class="code" href="group__gdsl__types.html#ga2c6b3f96b291b5b39d2799f93e350053" title="GDSL Free element function type.">gdsl_free_func_t</a> FREE_F,
<a name="l00085"></a>00085               <a class="code" href="group__gdsl__types.html#ga200177a9a1ac3f2363e228b0e5faeda7" title="GDSL Comparison element function type.">gdsl_compare_func_t</a> COMP_F
<a name="l00086"></a>00086               );
<a name="l00087"></a>00087 
<a name="l00101"></a>00101 <span class="keyword">extern</span> <span class="keywordtype">void</span>
<a name="l00102"></a>00102 <a class="code" href="group__gdsl__interval__heap.html#gae5d0d0082d3fac1ec99785463ef8f28b" title="Destroy an interval heap.">gdsl_interval_heap_free</a> (gdsl_interval_heap_t H
<a name="l00103"></a>00103              );
<a name="l00104"></a>00104 
<a name="l00118"></a>00118 <span class="keyword">extern</span> <span class="keywordtype">void</span>
<a name="l00119"></a>00119 <a class="code" href="group__gdsl__interval__heap.html#ga7dae75a663cfeabc66f2ee9b00578ace" title="Flush an interval heap.">gdsl_interval_heap_flush</a> (gdsl_interval_heap_t H
<a name="l00120"></a>00120               );
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 <span class="comment">/******************************************************************************/</span>
<a name="l00123"></a>00123 <span class="comment">/* Consultation functions of interval heaps                                   */</span>
<a name="l00124"></a>00124 <span class="comment">/******************************************************************************/</span>
<a name="l00125"></a>00125 
<a name="l00135"></a>00135 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>*
<a name="l00136"></a>00136 <a class="code" href="group__gdsl__interval__heap.html#ga52947a2da42093fc2311c8fb3ca491dd" title="Get the name of an interval heap.">gdsl_interval_heap_get_name</a> (<span class="keyword">const</span> gdsl_interval_heap_t H
<a name="l00137"></a>00137                  );
<a name="l00138"></a>00138 
<a name="l00146"></a>00146 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>
<a name="l00147"></a>00147 <a class="code" href="group__gdsl__interval__heap.html#ga1c7c88a01669c07f64e3294f949c0a43" title="Get the size of a interval heap.">gdsl_interval_heap_get_size</a> (<span class="keyword">const</span> gdsl_interval_heap_t H
<a name="l00148"></a>00148                  );
<a name="l00149"></a>00149 
<a name="l00158"></a>00158 <span class="keyword">extern</span>  <span class="keywordtype">void</span>
<a name="l00159"></a>00159 <a class="code" href="group__gdsl__interval__heap.html#ga21ee892d8003ff50222d0707c4281549" title="Set the maximum size of the interval heap.">gdsl_interval_heap_set_max_size</a> (<span class="keyword">const</span> gdsl_interval_heap_t H,
<a name="l00160"></a>00160                  <a class="code" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> size);
<a name="l00161"></a>00161 
<a name="l00171"></a>00171 <span class="keyword">extern</span> <span class="keywordtype">bool</span> 
<a name="l00172"></a>00172 <a class="code" href="group__gdsl__interval__heap.html#ga6e329a666da3a0b458268ada095c18fa" title="Check if an interval heap is empty.">gdsl_interval_heap_is_empty</a> (<span class="keyword">const</span> gdsl_interval_heap_t H
<a name="l00173"></a>00173                  );
<a name="l00174"></a>00174 
<a name="l00175"></a>00175 <span class="comment">/******************************************************************************/</span>
<a name="l00176"></a>00176 <span class="comment">/* Modification functions of interval heaps                                   */</span>
<a name="l00177"></a>00177 <span class="comment">/******************************************************************************/</span>
<a name="l00178"></a>00178   
<a name="l00192"></a>00192 <span class="keyword">extern</span> gdsl_interval_heap_t
<a name="l00193"></a>00193 <a class="code" href="group__gdsl__interval__heap.html#ga2075f45fca01382a89dbbf277f41388f" title="Set the name of an interval heap.">gdsl_interval_heap_set_name</a> (gdsl_interval_heap_t H,
<a name="l00194"></a>00194                  <span class="keyword">const</span> <span class="keywordtype">char</span>* NEW_NAME
<a name="l00195"></a>00195                  );
<a name="l00196"></a>00196 
<a name="l00197"></a>00197 
<a name="l00216"></a>00216 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7" title="GDSL element type.">gdsl_element_t</a>
<a name="l00217"></a>00217 <a class="code" href="group__gdsl__interval__heap.html#ga97ca3f86ba3907eed4db346e2f873f83" title="Insert an element into an interval heap (PUSH).">gdsl_interval_heap_insert</a> (gdsl_interval_heap_t H,
<a name="l00218"></a>00218                <span class="keywordtype">void</span>* VALUE
<a name="l00219"></a>00219                );
<a name="l00220"></a>00220 
<a name="l00235"></a>00235 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7" title="GDSL element type.">gdsl_element_t</a>
<a name="l00236"></a>00236 <a class="code" href="group__gdsl__interval__heap.html#ga1b5f2e5102825964d3543cae3d48eb0b" title="Remove the maximum element from an interval heap (POP).">gdsl_interval_heap_remove_max</a> (gdsl_interval_heap_t H
<a name="l00237"></a>00237                    );
<a name="l00238"></a>00238 
<a name="l00253"></a>00253 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7" title="GDSL element type.">gdsl_element_t</a>
<a name="l00254"></a>00254 <a class="code" href="group__gdsl__interval__heap.html#gab4e35b67b85609f6b0cc8f0521a8cacd" title="Remove the minimum element from an interval heap (POP).">gdsl_interval_heap_remove_min</a> (gdsl_interval_heap_t H
<a name="l00255"></a>00255                    );
<a name="l00256"></a>00256 
<a name="l00264"></a>00264 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7" title="GDSL element type.">gdsl_element_t</a>
<a name="l00265"></a>00265 <a class="code" href="group__gdsl__interval__heap.html#ga3576776093ad517de6d71f21b1567ede" title="Get the minimum element.">gdsl_interval_heap_get_min</a> (<span class="keyword">const</span> gdsl_interval_heap_t H
<a name="l00266"></a>00266                 );
<a name="l00267"></a>00267 
<a name="l00275"></a>00275 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7" title="GDSL element type.">gdsl_element_t</a>
<a name="l00276"></a>00276 <a class="code" href="group__gdsl__interval__heap.html#ga59ad41d4a5b072814068bf4edac5a108" title="Get the maximum element.">gdsl_interval_heap_get_max</a> (<span class="keyword">const</span> gdsl_interval_heap_t H
<a name="l00277"></a>00277                 );
<a name="l00278"></a>00278 
<a name="l00294"></a>00294 <span class="keyword">extern</span> gdsl_interval_heap_t
<a name="l00295"></a>00295 <a class="code" href="group__gdsl__interval__heap.html#ga55de933db44333826b51cb88f7d8de32" title="Delete the minimum element from an interval heap.">gdsl_interval_heap_delete_min</a> (gdsl_interval_heap_t H
<a name="l00296"></a>00296                    );
<a name="l00297"></a>00297 
<a name="l00313"></a>00313 <span class="keyword">extern</span> gdsl_interval_heap_t
<a name="l00314"></a>00314 <a class="code" href="group__gdsl__interval__heap.html#ga1953acd55f7763e63dd6b8fb36a85393" title="Delete the maximum element from an interval heap.">gdsl_interval_heap_delete_max</a> (gdsl_interval_heap_t H
<a name="l00315"></a>00315                    );
<a name="l00316"></a>00316 
<a name="l00317"></a>00317 <span class="comment">/******************************************************************************/</span>
<a name="l00318"></a>00318 <span class="comment">/* Parse functions of interval heaps                                          */</span>
<a name="l00319"></a>00319 <span class="comment">/******************************************************************************/</span>
<a name="l00320"></a>00320 
<a name="l00336"></a>00336 <span class="keyword">extern</span> <a class="code" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7" title="GDSL element type.">gdsl_element_t</a>
<a name="l00337"></a>00337 <a class="code" href="group__gdsl__interval__heap.html#ga2d74bb427724ab6b25d4e1b392ba9d51" title="Parse a interval heap.">gdsl_interval_heap_map_forward</a> (<span class="keyword">const</span> gdsl_interval_heap_t H,
<a name="l00338"></a>00338                 <a class="code" href="group__gdsl__types.html#ga2500bfaaec5df890e72b43f448f13ee8" title="GDSL Map element function type.">gdsl_map_func_t</a> MAP_F,
<a name="l00339"></a>00339                 <span class="keywordtype">void</span>* USER_DATA
<a name="l00340"></a>00340                 );
<a name="l00341"></a>00341 
<a name="l00342"></a>00342 <span class="comment">/******************************************************************************/</span>
<a name="l00343"></a>00343 <span class="comment">/* Input/output functions of interval heaps                                   */</span>
<a name="l00344"></a>00344 <span class="comment">/******************************************************************************/</span>
<a name="l00345"></a>00345 
<a name="l00361"></a>00361 <span class="keyword">extern</span> <span class="keywordtype">void</span>
<a name="l00362"></a>00362 <a class="code" href="group__gdsl__interval__heap.html#gac016064438876b2150380ccd5c9257e3" title="Write all the elements of an interval heap to a file.">gdsl_interval_heap_write</a> (<span class="keyword">const</span> gdsl_interval_heap_t H,
<a name="l00363"></a>00363               <a class="code" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6" title="GDSL Write element function type.">gdsl_write_func_t</a> WRITE_F,
<a name="l00364"></a>00364               FILE* OUTPUT_FILE,
<a name="l00365"></a>00365               <span class="keywordtype">void</span>* USER_DATA
<a name="l00366"></a>00366               );
<a name="l00367"></a>00367 
<a name="l00384"></a>00384 <span class="keyword">extern</span> <span class="keywordtype">void</span>
<a name="l00385"></a>00385 <a class="code" href="group__gdsl__interval__heap.html#ga80c44688b420e85e49e156ef95d1d14b" title="Write the content of an interval heap to a file into XML.">gdsl_interval_heap_write_xml</a> (<span class="keyword">const</span> gdsl_interval_heap_t H,
<a name="l00386"></a>00386                   <a class="code" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6" title="GDSL Write element function type.">gdsl_write_func_t</a> WRITE_F,
<a name="l00387"></a>00387                   FILE* OUTPUT_FILE,
<a name="l00388"></a>00388                   <span class="keywordtype">void</span>* USER_DATA
<a name="l00389"></a>00389                   );
<a name="l00390"></a>00390 
<a name="l00407"></a>00407 <span class="keyword">extern</span> <span class="keywordtype">void</span>
<a name="l00408"></a>00408 <a class="code" href="group__gdsl__interval__heap.html#ga3593968cc68acd5074281889395b11e0" title="Dump the internal structure of an interval heap to a file.">gdsl_interval_heap_dump</a> (<span class="keyword">const</span> gdsl_interval_heap_t H,
<a name="l00409"></a>00409              <a class="code" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6" title="GDSL Write element function type.">gdsl_write_func_t</a> WRITE_F,
<a name="l00410"></a>00410              FILE* OUTPUT_FILE,
<a name="l00411"></a>00411              <span class="keywordtype">void</span>* USER_DATA
<a name="l00412"></a>00412              );
<a name="l00413"></a>00413 
<a name="l00414"></a>00414 <span class="comment">/*</span>
<a name="l00415"></a>00415 <span class="comment"> * @}</span>
<a name="l00416"></a>00416 <span class="comment"> */</span>
<a name="l00417"></a>00417 
<a name="l00418"></a>00418 
<a name="l00419"></a>00419 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00420"></a>00420 <span class="preprocessor"></span>}
<a name="l00421"></a>00421 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
<a name="l00422"></a>00422 
<a name="l00423"></a>00423 
<a name="l00424"></a>00424 <span class="preprocessor">#endif </span><span class="comment">/* _GDSL_INTERVAL_HEAP_H_ */</span>
<a name="l00425"></a>00425 
<a name="l00426"></a>00426 
</pre></div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="gdsl__interval__heap_8h.html">gdsl_interval_heap.h</a>      </li>

    <li class="footer">Generated on Wed Jun 12 2013 18:18:47 for gdsl by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
